using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._RasterAnalysisTools._UseProximity
{
    /// <summary>
    /// <para>Distance Allocation</para>
    /// <para>Calculates distance allocation for each cell to the provided sources based on straight-line distance, cost distance, and true surface distance, as well as vertical and horizontal cost factors.</para>
    /// <para>根据直线距离、成本距离和真实表面距离以及垂直和水平成本系数计算每个像元到所提供源的距离分配。</para>
    /// </summary>    
    [DisplayName("Distance Allocation")]
    public class DistanceAllocation : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DistanceAllocation()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_inputSourceRasterOrFeatures">
        /// <para>Input source raster or features</para>
        /// <para><xdoc>
        ///   <para>The input source locations.</para>
        ///   <para>This is an image service or feature service that identifies the cells or locations from or to which the allocation for every output cell location is calculated.</para>
        ///   <para>For an image service, the input type can be integer or floating point.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入源位置。</para>
        ///   <para>这是一种影像服务或要素服务，用于标识从中或从中计算每个输出像元位置的分配的像元或位置。</para>
        ///   <para>对于影像服务，输入类型可以是整数或浮点。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_outputDistanceAllocationRasterName">
        /// <para>output distance allocation raster name</para>
        /// <para>The name of the output distance allocation raster service.</para>
        /// <para>输出距离分配栅格服务的名称。</para>
        /// </param>
        public DistanceAllocation(object _inputSourceRasterOrFeatures, object _outputDistanceAllocationRasterName)
        {
            this._inputSourceRasterOrFeatures = _inputSourceRasterOrFeatures;
            this._outputDistanceAllocationRasterName = _outputDistanceAllocationRasterName;
        }
        public override string ToolboxName => "Raster Analysis Tools";

        public override string ToolName => "Distance Allocation";

        public override string CallName => "ra.DistanceAllocation";

        public override List<string> AcceptEnvironments => ["cellSize", "extent", "mask", "outputCoordinateSystem", "snapRaster"];

        public override object[] ParameterInfo => [_inputSourceRasterOrFeatures, _outputDistanceAllocationRasterName, _inputBarrierRasterOrFeatures, _inputSurfaceRaster, _inputCostRaster, _inputVerticalRaster, _verticalFactor, _inputHorizontalRaster, _horizontalFactor, _outputDistanceAccumulationRasterName, _outputBackDirectionRasterName, _outputSourceDirectionRasterName, _outputSourceLocationRasterName, _sourceField, _sourceInitialAccumulation, _sourceMaximumAccumulation, _sourceCostMultiplier, _sourceDirection.GetGPValue(), _distanceMethod.GetGPValue(), _outputDistanceAllocationRaster, _outputDistanceAccumulationRaster, _outputBackDirectionRaster, _outputSourceDirectionRaster, _outputSourceLocationRaster];

        /// <summary>
        /// <para>Input source raster or features</para>
        /// <para><xdoc>
        ///   <para>The input source locations.</para>
        ///   <para>This is an image service or feature service that identifies the cells or locations from or to which the allocation for every output cell location is calculated.</para>
        ///   <para>For an image service, the input type can be integer or floating point.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入源位置。</para>
        ///   <para>这是一种影像服务或要素服务，用于标识从中或从中计算每个输出像元位置的分配的像元或位置。</para>
        ///   <para>对于影像服务，输入类型可以是整数或浮点。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input source raster or features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _inputSourceRasterOrFeatures { get; set; }


        /// <summary>
        /// <para>output distance allocation raster name</para>
        /// <para>The name of the output distance allocation raster service.</para>
        /// <para>输出距离分配栅格服务的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("output distance allocation raster name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _outputDistanceAllocationRasterName { get; set; }


        /// <summary>
        /// <para>Input barrier raster or features</para>
        /// <para><xdoc>
        ///   <para>The dataset that defines the barriers.</para>
        ///   <para>The barriers can be defined by an integer or a floating-point image service, or by a feature service.</para>
        ///   <para>For an image service barrier, the barrier must have a valid value, including zero, and the areas that are not barriers must be NoData.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义障碍的数据集。</para>
        ///   <para>障碍可以由整数或浮点影像服务或要素服务定义。</para>
        ///   <para>对于影像服务屏障，屏障必须具有有效值（包括零），并且非屏障的区域必须为 NoData。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input barrier raster or features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _inputBarrierRasterOrFeatures { get; set; } = null;


        /// <summary>
        /// <para>Input surface raster</para>
        /// <para><xdoc>
        ///   <para>An image service defining the elevation values at each cell location.</para>
        ///   <para>The values are used to calculate the actual surface distance covered when passing between cells.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于定义每个像元位置的高程值的影像服务。</para>
        ///   <para>这些值用于计算在单元之间通过时覆盖的实际表面距离。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input surface raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _inputSurfaceRaster { get; set; } = null;


        /// <summary>
        /// <para>Input cost raster</para>
        /// <para><xdoc>
        ///   <para>An image service defining the impedance or cost to move planimetrically through each cell.</para>
        ///   <para>The value at each cell location represents the cost-per-unit distance for moving through the cell. Each cell location value is multiplied by the cell resolution while also compensating for diagonal movement to obtain the total cost of passing through the cell.</para>
        ///   <para>The values of the cost raster can be integer or floating point, but they cannot be negative or zero (you cannot have a negative or zero cost).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一种影像服务，用于定义在每个单元中平面移动的阻抗或成本。</para>
        ///   <para>每个像元位置的值表示在像元中移动的单位距离成本。每个像元位置值乘以像元分辨率，同时还补偿对角线移动，以获得通过像元的总成本。</para>
        ///   <para>成本栅格的值可以是整数或浮点，但不能为负数或零（不能为负数或零成本）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input cost raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _inputCostRaster { get; set; } = null;


        /// <summary>
        /// <para>Input vertical raster</para>
        /// <para><xdoc>
        ///   <para>An image service defining the z-values for each cell location.</para>
        ///   <para>The values are used for calculating the slope used to identify the vertical factor incurred when moving from one cell to another.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义每个像元位置的 z 值的影像服务。</para>
        ///   <para>这些值用于计算斜率，用于识别从一个像元移动到另一个像元时产生的垂直系数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input vertical raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _inputVerticalRaster { get; set; } = null;


        /// <summary>
        /// <para>Vertical factor</para>
        /// <para><xdoc>
        ///   <para>Specifies the relationship between the vertical cost factor and the vertical relative moving angle (VRMA).</para>
        ///   <para>There are several factors with modifiers from which to select that identify a defined vertical factor graph. The graphs are used to identify the vertical factor used in calculating the total cost for moving into a neighboring cell.</para>
        ///   <para>In the descriptions below, vertical factor (VF) defines the vertical difficulty encountered in moving from one cell to the next, and vertical relative moving angle (VRMA) identifies the slope angle between the FROM or processing cell and the TO cell.</para>
        ///   <para>The Vertical factor options are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>Binary—If the VRMA is greater than the low-cut angle and less than the high-cut angle, the VF is set to the value associated with the zero factor; otherwise, it is infinity.</bullet_item><para/>
        ///     <bullet_item>Linear—The VF is a linear function of the VRMA.</bullet_item><para/>
        ///     <bullet_item>Symmetric Linear—The VF is a linear function of the VRMA in either the negative or positive side of the VRMA, and the two linear functions are symmetrical with respect to the VF (y) axis.</bullet_item><para/>
        ///     <bullet_item>Inverse Linear—The VF is an inverse linear function of the VRMA.</bullet_item><para/>
        ///     <bullet_item>Symmetric Inverse Linear—The VF is an inverse linear function of the VRMA in either the negative or positive side of the VRMA, and the two linear functions are symmetrical with respect to the VF (y) axis.</bullet_item><para/>
        ///     <bullet_item>Cos—The VF is the cosine-based function of the VRMA.</bullet_item><para/>
        ///     <bullet_item>Sec—The VF is the secant-based function of the VRMA.</bullet_item><para/>
        ///     <bullet_item>Cos-Sec—The VF is the cosine-based function of the VRMA when the VRMA is negative and is the secant-based function of the VRMA when the VRMA is nonnegative.</bullet_item><para/>
        ///     <bullet_item>Sec-Cos—The VF is the secant-based function of the VRMA when the VRMA is negative and is the cosine-based function of the VRMA when the VRMA is nonnegative.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Modifiers to the vertical keywords are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>Zero factor—The vertical factor used when the VRMA is zero. This factor positions the y-intercept of the specified function. By definition, the zero factor is not applicable to any of the trigonometric vertical functions (COS, SEC, COS-SEC, or SEC-COS). The y-intercept is defined by these functions.</bullet_item><para/>
        ///     <bullet_item>Low Cut angle—The VRMA angle below which the VF will be set to infinity.</bullet_item><para/>
        ///     <bullet_item>High Cut angle—The VRMA angle above which the VF will be set to infinity.</bullet_item><para/>
        ///     <bullet_item>Slope—The slope of the straight line used with the Linear and Inverse Linear vertical factor keywords. The slope is specified as a fraction of rise over run (for example, 45 percent slope is 1/45, which is input as 0.02222).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定垂直成本系数与垂直相对移动角 （VRMA） 之间的关系。</para>
        ///   <para>有几个带有修饰符的因子可供选择，用于标识定义的垂直因子图。这些图表用于识别用于计算移动到相邻单元格的总成本的垂直因子。</para>
        ///   <para>在下面的描述中，垂直因子 （VF） 定义从一个单元移动到下一个单元时遇到的垂直困难，垂直相对移动角 （VRMA） 标识 FROM 或处理单元与 TO 单元之间的斜角。</para>
        ///   <para>垂直系数选项如下：</para>
        ///   <bulletList>
        ///     <bullet_item>二进制 - 如果 VRMA 大于低切角且小于高切角，则 VF 设置为与零因子关联的值;否则，它是无穷大的。</bullet_item><para/>
        ///     <bullet_item>线性—VF 是 VRMA 的线性函数。</bullet_item><para/>
        ///     <bullet_item>对称线性 （Symmetric Linear） - VF 是 VRMA 在 VRMA 负侧或正侧的线性函数，并且两个线性函数相对于 VF （y） 轴对称。</bullet_item><para/>
        ///     <bullet_item>反线性—VF 是 VRMA 的反线性函数。</bullet_item><para/>
        ///     <bullet_item>对称反线性—VF 是 VRMA 在 VRMA 的负侧或正侧的反线性函数，并且两个线性函数相对于 VF （y） 轴对称。</bullet_item><para/>
        ///     <bullet_item>Cos—VF 是 VRMA 的基于余弦的函数。</bullet_item><para/>
        ///     <bullet_item>秒 — VF 是 VRMA 的基于割线的函数。</bullet_item><para/>
        ///     <bullet_item>余秒—当 VRMA 为负时，VF 是 VRMA 的基于余弦的函数，当 VRMA 为非负时，VF 是 VRMA 的基于正割的函数。</bullet_item><para/>
        ///     <bullet_item>Sec-Cos — 当 VRMA 为负时，VF 是 VRMA 的基于割线的函数，当 VRMA 为非负时，VF 是 VRMA 的基于余弦的函数。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>垂直关键字的修饰符如下：</para>
        ///   <bulletList>
        ///     <bullet_item>零因子 - VRMA 为零时使用的垂直因子。此因子定位指定函数的 y 截距。根据定义，零因子不适用于任何三角垂直函数（COS、SEC、COS-SEC 或 SEC-COS）。y 截距由这些函数定义。</bullet_item><para/>
        ///     <bullet_item>低切角 （Low Cut angle） - VF 将设置为无穷大的 VRMA 角度。</bullet_item><para/>
        ///     <bullet_item>高切割角度 （High Cut angle） - VF 将设置为无穷大的 VRMA 角度。</bullet_item><para/>
        ///     <bullet_item>坡度 - 用于线性和反线性垂直因子关键字的直线坡度。斜率指定为运行上升的分数（例如，45% 的斜率为 1/45，输入为 0.02222）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Vertical factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _verticalFactor { get; set; } = null;


        /// <summary>
        /// <para>Input horizontal raster</para>
        /// <para><xdoc>
        ///   <para>An image service defining the horizontal direction at each cell.</para>
        ///   <para>The values on the raster must be integers ranging from 0 to 360, with 0 degrees being north, or toward the top of the screen, and increasing clockwise. Flat areas should be given a value of -1. The values at each location will be used in conjunction with the Horizontal factor parameter to determine the horizontal cost incurred when moving from a cell to its neighbors.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义每个像元的水平方向的影像服务。</para>
        ///   <para>栅格上的值必须是介于 0 到 360 之间的整数，其中 0 度表示北或朝向屏幕顶部，并顺时针递增。平坦区域的值应为 -1。每个位置的值将与水平因子参数结合使用，以确定从像元移动到其相邻像元时产生的水平成本。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input horizontal raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _inputHorizontalRaster { get; set; } = null;


        /// <summary>
        /// <para>Horizontal factor</para>
        /// <para><xdoc>
        ///   <para>Specifies the relationship between the horizontal cost factor and the horizontal relative moving angle (HRMA).</para>
        ///   <para>There are several factors with modifiers from which to select that identify a defined horizontal factor graph. The graphs are used to identify the horizontal factor used in calculating the total cost for moving into a neighboring cell.</para>
        ///   <para>In the descriptions below, horizontal factor (HF) defines the horizontal difficulty encountered when moving from one cell to the next, and horizontal relative moving angle (HRMA) identifies the angle between the horizontal direction from a cell and the moving direction.</para>
        ///   <para>The Horizontal factor options are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>Binary—If the HRMA is less than the cut angle, the HF is set to the value associated with the zero factor; otherwise, it is infinity.</bullet_item><para/>
        ///     <bullet_item>Forward—Only forward movement is allowed. The HRMA must be greater than or equal to 0 and less than 90 degrees (0 <= HRMA < 90). If the HRMA is greater than 0 and less than 45 degrees, the HF for the cell is set to the value associated with the zero factor. If the HRMA is greater than or equal to 45 degrees, the side value modifier value is used. The HF for any HRMA equal to or greater than 90 degrees is set to infinity.</bullet_item><para/>
        ///     <bullet_item>Linear—The HF is a linear function of the HRMA.</bullet_item><para/>
        ///     <bullet_item>Inverse Linear—The HF is an inverse linear function of the HRMA.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Modifiers to the horizontal factors are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>Zero factor—The horizontal factor to be used when the HRMA is zero. This factor positions the y-intercept for any of the horizontal factor functions.</bullet_item><para/>
        ///     <bullet_item>Cut angle—The HRMA angle beyond which the HF will be set to infinity.</bullet_item><para/>
        ///     <bullet_item>Slope—The slope of the straight line used with the Linear and Inverse Linear horizontal factor keywords. The slope is specified as a fraction of rise over run (for example, 45 percent slope is 1/45, which is input as 0.02222).</bullet_item><para/>
        ///     <bullet_item>Side value—The HF when the HRMA is greater than or equal to 45 degrees and less than 90 degrees when the Forward horizontal factor keyword is specified.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定水平成本系数与水平相对移动角 （HRMA） 之间的关系。</para>
        ///   <para>有几个带有修饰符的因子可供选择，用于标识定义的水平因子图。这些图表用于识别用于计算移动到相邻单元格的总成本的水平因子。</para>
        ///   <para>在下面的描述中，水平因子 （HF） 定义从一个单元移动到下一个单元时遇到的水平困难，水平相对移动角 （HRMA） 标识单元格的水平方向与移动方向之间的角度。</para>
        ///   <para>水平因子选项如下：</para>
        ///   <bulletList>
        ///     <bullet_item>二进制 - 如果 HRMA 小于切割角，则 HF 设置为与零因子关联的值;否则，它是无穷大的。</bullet_item><para/>
        /// <bullet_item>向前 - 仅允许向前移动。HRMA 必须大于或等于 0 且小于 90 度 （0 <= HRMA < 90）。如果 HRMA 大于 0 且小于 45 度，则像元的 HF 设置为与零因子关联的值。如果 HRMA 大于或等于 45 度，则使用边值修饰符值。任何等于或大于 90 度的 HRMA 的 HF 设置为无穷大。</bullet_item><para/>
        ///     <bullet_item>线性—HF 是 HRMA 的线性函数。</bullet_item><para/>
        ///     <bullet_item>反线性—HF 是 HRMA 的反线性函数。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>水平因子的修饰符如下：</para>
        ///   <bulletList>
        ///     <bullet_item>零因子 - HRMA 为零时要使用的水平因子。该因子定位任何水平因子函数的 y 截距。</bullet_item><para/>
        ///     <bullet_item>切割角度 - HRMA 角度，超过该角度，HF 将设置为无穷大。</bullet_item><para/>
        ///     <bullet_item>坡度 - 用于线性和反线性水平因子关键字的直线坡度。斜率指定为运行上升的分数（例如，45% 的斜率为 1/45，输入为 0.02222）。</bullet_item><para/>
        ///     <bullet_item>边值 - 当 HRMA 大于或等于 45 度时的 HF，以及指定前向水平因子关键字时小于 90 度时的 HF。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Horizontal factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _horizontalFactor { get; set; } = null;


        /// <summary>
        /// <para>Out distance accumulation raster name</para>
        /// <para><xdoc>
        ///   <para>The output distance accumulation raster name.</para>
        ///   <para>The distance accumulation raster contains the accumulative distance for each cell from, or to, the least-cost source.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出距离累积栅格名称。</para>
        ///   <para>距离累积栅格包含每个像元从成本最低源到源的累积距离。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Out distance accumulation raster name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _outputDistanceAccumulationRasterName { get; set; } = null;


        /// <summary>
        /// <para>Out back direction raster name</para>
        /// <para><xdoc>
        ///   <para>The output back direction raster name.</para>
        ///   <para>The back direction raster contains calculated directions in degrees. The direction identifies the next cell along the optimal path back to the least accumulative cost source while avoiding barriers.</para>
        ///   <para>The range of values is from 0 degrees to 360 degrees. The value 0 is reserved for the source cells. Due east (right) is 90 degrees, and the values increase clockwise (180 is south, 270 is west, and 360 is north).</para>
        ///   <para>The output raster is of type float.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出返回方向栅格名称。</para>
        ///   <para>返回方向栅格包含以度为单位的计算方向。该方向沿最佳路径确定下一个单元，返回到累积成本最低的来源，同时避免障碍。</para>
        ///   <para>值的范围是从 0 度到 360 度。值 0 保留给源单元格。正东（右）为 90 度，值顺时针增加（180 为南，270 为西，360 为北）。</para>
        ///   <para>输出栅格的类型为浮点型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Out back direction raster name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _outputBackDirectionRasterName { get; set; } = null;


        /// <summary>
        /// <para>Out source direction raster name</para>
        /// <para><xdoc>
        ///   <para>The output source direction raster name.</para>
        ///   <para>The source direction raster identifies the direction of the least accumulated cost source cell as an azimuth in degrees.</para>
        ///   <para>The range of values is from 0 degrees to 360 degrees. The value 0 is reserved for the source cells. Due east (right) is 90 degrees, and the values increase clockwise (180 is south, 270 is west, and 360 is north).</para>
        ///   <para>The output raster is of type float.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出源方向栅格名称。</para>
        ///   <para>源方向栅格将累积成本最低的源像元的方向标识为方位角（以度为单位）。</para>
        ///   <para>值的范围是从 0 度到 360 度。值 0 保留给源单元格。正东（右）为 90 度，值顺时针增加（180 为南，270 为西，360 为北）。</para>
        ///   <para>输出栅格的类型为浮点型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Out source direction raster name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _outputSourceDirectionRasterName { get; set; } = null;


        /// <summary>
        /// <para>Out source location raster name</para>
        /// <para><xdoc>
        ///   <para>The output source location raster name.</para>
        ///   <para>The source location raster is a multiband output. The first band contains a row index, and the second band contains a column index. These indexes identify the location of the source cell that is the least accumulated cost distance away.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出源位置栅格名称。</para>
        ///   <para>源位置栅格是多波段输出。第一个波段包含行索引，第二个波段包含列索引。这些索引标识源单元的位置，该位置是累积成本距离最小的距离。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Out source location raster name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _outputSourceLocationRasterName { get; set; } = null;


        /// <summary>
        /// <para>Source field</para>
        /// <para>The field used to assign values to the source locations. It must be of type integer.</para>
        /// <para>用于为源位置分配值的字段。它必须是整数类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _sourceField { get; set; } = null;


        /// <summary>
        /// <para>Initial accumulation</para>
        /// <para><xdoc>
        ///   <para>The initial accumulative cost to begin the cost calculation.</para>
        ///   <para>Allows for the specification of the fixed cost associated with a source. Instead of starting at a cost of zero, the cost algorithm will begin with the value set by Initial accumulation.</para>
        ///   <para>The values must be zero or greater. The default is 0.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>开始成本计算的初始累计成本。</para>
        ///   <para>允许指定与源关联的固定成本。成本算法不是从零成本开始，而是从初始累积设置的值开始。</para>
        ///   <para>这些值必须为零或更大。默认值为 0。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Initial accumulation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _sourceInitialAccumulation { get; set; } = null;


        /// <summary>
        /// <para>Maximum accumulation</para>
        /// <para><xdoc>
        ///   <para>The maximum accumulation for the traveler for a source.</para>
        ///   <para>The cost calculations continue for each source until the specified accumulation is reached.</para>
        ///   <para>The values must be greater than zero. The default accumulation is to the edge of the output raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>旅行者对源的最大累积。</para>
        ///   <para>每个源的成本计算将继续进行，直到达到指定的累积。</para>
        ///   <para>这些值必须大于零。默认累积为输出栅格的边缘。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum accumulation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _sourceMaximumAccumulation { get; set; } = null;


        /// <summary>
        /// <para>Multiplier to apply to costs</para>
        /// <para><xdoc>
        ///   <para>The multiplier to apply to the cost values.</para>
        ///   <para>This allows for control of the mode of travel or the magnitude at a source. The greater the multiplier, the greater the cost to move through each cell.</para>
        ///   <para>The values must be greater than zero. The default is 1.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>应用于成本值的乘数。</para>
        ///   <para>这允许控制行进方式或源的大小。乘数越大，通过每个单元格移动的成本就越大。</para>
        ///   <para>这些值必须大于零。默认值为 1。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Multiplier to apply to costs")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _sourceCostMultiplier { get; set; } = null;


        /// <summary>
        /// <para>Travel direction</para>
        /// <para><xdoc>
        ///   <para>Specifies the direction of the traveler when applying horizontal and vertical factors.</para>
        ///   <bulletList>
        ///     <bullet_item>Travel from source—The horizontal factor and vertical factor will be applied beginning at the input source and travel out to the nonsource cells. This is the default.</bullet_item><para/>
        ///     <bullet_item>Travel to source—The horizontal factor and vertical factor will be applied beginning at each nonsource cell and travel back to the input source.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>If you select the String option, you can choose between from and to options, which will be applied to all sources.</para>
        ///   <para>If you select the Field option, you can select the field from the source data that determines the direction to use for each source. The field must contain the text string FROM_SOURCE or TO_SOURCE.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定应用水平和垂直因子时行走者的方向。</para>
        ///   <bulletList>
        ///     <bullet_item>从源开始传输 - 水平因子和垂直因子将从输入源开始应用，然后向外移动到非源像元。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>传往源 - 水平因子和垂直因子将从每个非源像元开始应用，然后返回输入源。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果选择“字符串”选项，则可以在“从”和“到”选项之间进行选择，这些选项将应用于所有源。</para>
        ///   <para>如果选择“字段”选项，则可以从源数据中选择用于确定每个源使用方向的字段。该字段必须包含文本字符串 FROM_SOURCE 或 TO_SOURCE。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel direction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _sourceDirection_value? _sourceDirection { get; set; } = null;

        public enum _sourceDirection_value
        {
            /// <summary>
            /// <para>Travel to source</para>
            /// <para>Travel to source—The horizontal factor and vertical factor will be applied beginning at each nonsource cell and travel back to the input source.</para>
            /// <para>传往源 - 水平因子和垂直因子将从每个非源像元开始应用，然后返回输入源。</para>
            /// </summary>
            [Description("Travel to source")]
            [GPEnumValue("TO_SOURCE")]
            _TO_SOURCE,

            /// <summary>
            /// <para>Travel from source</para>
            /// <para>Travel from source—The horizontal factor and vertical factor will be applied beginning at the input source and travel out to the nonsource cells. This is the default.</para>
            /// <para>从源开始传输 - 水平因子和垂直因子将从输入源开始应用，然后向外移动到非源像元。这是默认设置。</para>
            /// </summary>
            [Description("Travel from source")]
            [GPEnumValue("FROM_SOURCE")]
            _FROM_SOURCE,

        }

        /// <summary>
        /// <para>Distance Method</para>
        /// <para><xdoc>
        ///   <para>Specifies whether to calculate the distance using a planar (flat earth) or a geodesic (ellipsoid) method.</para>
        ///   <bulletList>
        ///     <bullet_item>Planar—The distance calculation will be performed on a projected flat plane using a 2D Cartesian coordinate system. This is the default.</bullet_item><para/>
        ///     <bullet_item>Geodesic—The distance calculation will be performed on the ellipsoid. Therefore, regardless of input or output projection, the results do not change.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是使用平面（平坦地球）还是测地线（椭球体）方法计算距离。</para>
        ///   <bulletList>
        ///     <bullet_item>平面—将使用 2D 笛卡尔坐标系在投影平面上执行距离计算。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>测地线—将在椭球体上执行距离计算。因此，无论输入或输出投影如何，结果都不会改变。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _distanceMethod_value _distanceMethod { get; set; } = _distanceMethod_value._PLANAR;

        public enum _distanceMethod_value
        {
            /// <summary>
            /// <para>Planar</para>
            /// <para>Planar—The distance calculation will be performed on a projected flat plane using a 2D Cartesian coordinate system. This is the default.</para>
            /// <para>平面—将使用 2D 笛卡尔坐标系在投影平面上执行距离计算。这是默认设置。</para>
            /// </summary>
            [Description("Planar")]
            [GPEnumValue("PLANAR")]
            _PLANAR,

            /// <summary>
            /// <para>Geodesic</para>
            /// <para>Geodesic—The distance calculation will be performed on the ellipsoid. Therefore, regardless of input or output projection, the results do not change.</para>
            /// <para>测地线—将在椭球体上执行距离计算。因此，无论输入或输出投影如何，结果都不会改变。</para>
            /// </summary>
            [Description("Geodesic")]
            [GPEnumValue("GEODESIC")]
            _GEODESIC,

        }

        /// <summary>
        /// <para>Output distance allocation raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output distance allocation raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputDistanceAllocationRaster { get; set; }


        /// <summary>
        /// <para>Output distance accumulation raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output distance accumulation raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputDistanceAccumulationRaster { get; set; }


        /// <summary>
        /// <para>Output back direction raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output back direction raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputBackDirectionRaster { get; set; }


        /// <summary>
        /// <para>Output source direction raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output source direction raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputSourceDirectionRaster { get; set; }


        /// <summary>
        /// <para>Output source location raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output source location raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputSourceLocationRaster { get; set; }


        public DistanceAllocation SetEnv(object cellSize = null, object extent = null, object mask = null, object outputCoordinateSystem = null, object snapRaster = null)
        {
            base.SetEnv(cellSize: cellSize, extent: extent, mask: mask, outputCoordinateSystem: outputCoordinateSystem, snapRaster: snapRaster);
            return this;
        }

    }

}